package com.cms.content.jobs.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cms.content.jobs.dao.JobsDepartmentDAO;
import com.cms.content.jobs.pojo.JobsDepartment;
import com.cms.content.jobs.service.JobsDepartmentService;
@Service
public class JobsDepartmentServiceImpl implements JobsDepartmentService {
	@Autowired
	JobsDepartmentDAO jobsDepartmentDAO;
	@Override
	public boolean saveJobsDepartment(JobsDepartment jobsDepartment) {
		if(jobsDepartment.getId()==null){
			return jobsDepartmentDAO.insert(jobsDepartment)>0;
		}else{
			return jobsDepartmentDAO.updateByPrimaryKey(jobsDepartment)>0;
		}
	}

	@Override
	public boolean deleteByCatId(Integer id) {
		return jobsDepartmentDAO.deleteByPrimaryKey(id)>0;
	}

	@Override
	public JobsDepartment findByCatId(Integer Id) {
		return jobsDepartmentDAO.selectByPrimaryKey(Id);
	}

	@Override
	public List<JobsDepartment> findList() {
		// TODO Auto-generated method stub
		return null;
	}

}
